﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AdministarImagenes.aspx.cs" Inherits="ddcCajamarca.Web.Administracion.AdministarImagenes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                    <h3><b>Imágenes</b></h3>
            </div>
            <div class="panel-body">

                <div class="row">
                    <div class="col-xs-12 col-lg-4">
                        <asp:UpdatePanel ID="upImagenes" runat="server">
                            <ContentTemplate>
                                <asp:ListView ID="lvAmbiente" runat="server"
                                    ItemType="ddcCajamarca.BusinessEntities.Administracion.Imagen"
                                    SelectMethod="GetImagenes">
                                    <LayoutTemplate>
                                        <table class="table table-hover table-condensed">
                                            <thead>
                                                <tr class="danger">
                                                    <th>Foto</th>
                                                    <th>Acción</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr id="itemPlaceholder" runat="server" />
                                            </tbody>
                                        </table>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <tr class="warning">
                                            <td><%# Item.Descripcion %></td>
                                            <td>
                                                <a href="AdministarImagenes.aspx?idImg=<%#Item.Id %>&opc=editar" class="glyphicon glyphicon-pencil label label-warning">&nbsp;Editar</a>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:ListView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <%-- /UpPanel --%>
                    </div>
                    <div class="modal-content col-xs-12 col-lg-8">
                        <div class="modal-header">
                            <h3 class="panel-title"><strong>Cambiar Imagen</strong></h3>
                        </div>
                        <div class="panel-body">
                            <div class="col-xs-12 col-lg-4">
                                <asp:TextBox ID="tbxId" runat="server" Visible="False" />
                                <b><asp:Label ID="lblDescripcion" Text="Descripción" runat="server" Visible="False" /></b>
                                <asp:RequiredFieldValidator ID="rfvDescripcion" runat="server" ControlToValidate="tbxDescripcion" ErrorMessage=" Campo Necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:TextBox CssClass="form-control input-sm" ID="tbxDescripcion" MaxLength="80" runat="server" Visible="False" />
                                <b><asp:Label ID="lblNewImg" Text="Imagen" runat="server" Visible="False" /> </b>
                                <asp:FileUpload ID="fuFoto" CssClass="form-control input-sm" runat="server" Visible="False" />
                                <br />
                            </div>
                            <div class="col-xs-12 col-lg-8">
                                Esta imagen se llama&nbsp;<b><asp:Label ID="lblImagen" Text="" runat="server" /></b>&nbsp;y será cambiada.
                                <asp:Image CssClass="img-responsive img-rounded" ID="imgFoto" runat="server" Visible="False" />
                            </div>
                        </div>
                        <div class="modal-footer">
                            <a class="btn btn-default" href="AdministarImagenes.aspx" >Calcelar</a>
                            <asp:Button CssClass="btn btn-primary" ID="btnGuardarImg" Text="Guardar" runat="server" OnClick="btnGuardarImg_Click" Visible="False" />
                        </div>
                    </div>
                </div>
                
                

            </div>
            
        </div>
    </div>
</asp:Content>
